
/**
 * @Project : Clion_ProgrammingExercises
 * @File : A1001
 * @Author : WangRuoyu 
 * @Date : 2023/5/8 19:18
 */

#include "iostream"

using namespace std;

int main() {

    int a, b;
    cin >> a >> b;
    int c = a + b;
    string str = to_string(c);

    int id = 0;
    if (str[0] == '-') {
        cout << "-";
        id = 1;
    }
    int len = str.size() - id;
    int mod = len % 3;
    int times = len / 3;
    if (mod != 0) {
        int k = id + mod;
        for (; id < k; ++id) {
            cout << str[id];
        }
    } else {
        int k = id + 3;
        for (; id < k; ++id) {
            cout << str[id];
        }
        times -= 1;
    }

    while (times--) {
        cout << "," << str[id++] << str[id++] << str[id++];
    }

    return 0;
}
